<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<c:set var="context"
	value="${pageContext.request.servletContext.contextPath}" />

<script>
	$(function() {
		$("#startTime").datetimepicker();
		$("#endTime").datetimepicker();
	});
</script>
<!-- Template for all sub-pages -->
<div id="portal_main_content" align="left">
	<!-- Don't change this -->
	<div id="site_title">

		<!-- ************** -->
		<!-- Able to change -->
		<h2>Tests & Quizzes: Add new Test</h2>
	</div>
	<!-- Don't change this -->
	<div id="site_content">
		<div id="btn_control">

			<!-- ************** -->
			<!-- Able to change -->
		</div>
		<div id="main_content">

			<!-- ************** -->
			<!-- Able to change -->
			<form:form action="add" modelAttribute="test" method="post"
				style="min-width: 240px;">
				<fieldset class="input_table">
					<legend>Add Test</legend>
					<div class="input_row hidden">
						<div>Name</div>
						<div>
							<form:input path="testAndQuizzID" placeholder="Id"
								cssClass="form-control" />
						</div>
						<div class="error"></div>
					</div>
					<div class="input_row">
						<div>Name</div>
						<div>
							<form:input path="testAndQuizzName" placeholder="Name"
								cssClass="form-control" />
						</div>
						<div>
							<form:errors path="testAndQuizzName" cssClass="error" />
						</div>
					</div>
					<div class="input_row">
						<div>Start Time</div>
						<div>
							<form:input id="startTime" type="text" path="startDay"
								data-date-format="DD/MM/YYYY hh:mm:ss" placeholder="Start Time"
								cssClass="form-control" />
						</div>
						<div>
							<form:errors path="startDay" cssClass="error" />
						</div>
					</div>
					<div class="input_row"></div>
					<div class="input_row">
						<div>End Time</div>
						<div>
							<form:input id="endTime" path="endDay" placeholder="End Time"
								data-date-format="DD/MM/YYYY hh:mm:ss" cssClass="form-control" />
						</div>
						<div>
							<form:errors path="endDay" cssClass="error" />
						</div>
					</div>
					<div class="input_row">
						<div>Test Duration</div>
						<div>
							<form:input path="testDuration"
								placeholder="Test Duration in minute" cssClass="form-control" />
						</div>
						<div>
							<form:errors path="testDuration" cssClass="error" />
						</div>
					</div>
					<div class="input_row">
						<div>Submit Time Allow</div>
						<div>
							<form:input path="submitTimeAllow"
								placeholder="Number of submit time allowed"
								cssClass="form-control" />
						</div>
						<div>
							<form:errors path="submitTimeAllow" cssClass="error" />
						</div>
					</div>
					<div class="input_row"></div>

					<div class="input_row">
						<div></div>
						<div>
							<input type="submit" value="Save" class="btn btn-primary" /> <a
								href="../test/" class="btn btn-primary">Cancel</a>
						</div>
						<div></div>
					</div>
				</fieldset>
			</form:form>
		</div>
		<div id="table">

			<!-- ************** -->
			<!-- Able to change -->
		</div>

	</div>
</div>

